home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Offline Browsing / HTTrack.exe / data1.cab / Sources / lib / httracklib.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-04-28  |  3.9 KB  |  125 lines

  1. /* ------------------------------------------------------------ */
  2. /*
  3. HTTrack Website Copier, Offline Browser for Windows and Unix
  4. Copyright (C) Xavier Roche and other contributors
  5.  
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  19.  
  20.  
  21. Important notes:
  22.  
  23. - We hereby ask people using this source NOT to use it in purpose of grabbing
  24. emails addresses, or collecting any other private information on persons.
  25. This would disgrace our work, and spoil the many hours we spent on it.
  26.  
  27.  
  28. This project has been developed by Xavier Roche and other contributors
  29. (see the greetings and readme files)
  30.  
  31.  
  32. Please visit our Website: http://www.httrack.com
  33. */
  34.  
  35. /* ------------------------------------------------------------ */
  36. /* File: httracklib.h:                                          */
  37. /* library definitions                                          */
  38. /* ------------------------------------------------------------ */
  39.  
  40. #ifdef _cplusplus
  41. extern "C" {
  42. #endif
  43.  
  44. /*
  45.  * Name:           HTTrackLib_main
  46.  * Description:    Main HTTrack function
  47.  * Parameters:     argc (number of arguments)
  48.  *                 argv (arguments)
  49.  * Returns:        Error status
  50. */
  51. int HTTrackLib_main(int argc, char **argv);
  52.  
  53.  
  54. /* CALLBACK FUNCTIONS */
  55.  
  56. /*
  57.  * Name:           HTTrackLib_Init
  58.  * Description:    Called during HTTrack initialization
  59.  * Parameters:     None
  60.  * Should return:  Nothing
  61. */
  62. void HTTrackLib_Init();
  63.  
  64.  
  65. /*
  66.  * Name:           HTTrackLib_Close
  67.  * Description:    Called during HTTrack termination
  68.  * Parameters:     None
  69.  * Should return:  Nothing
  70. */
  71. void HTTrackLib_Close();
  72.  
  73.  
  74. /*
  75.  * Name:           HTTrackLib_Start
  76.  * Description:    Called before HTTrack starts the mirror
  77.  * Parameters:     None
  78.  * Should return:  1 if no error has been detected
  79. */
  80. int HTTrackLib_Start();
  81.  
  82. /*
  83.  * Name:           HTTrackLib_End
  84.  * Description:    Called after HTTrack ends the mirror
  85.  * Parameters:     None
  86.  * Should return:  1 if no error has been detected
  87. */
  88. int HTTrackLib_End(); 
  89.  
  90.  
  91. /*
  92.  * Name:           HTTrackLib_TestLink
  93.  * Description:    Test if a link has to be caught
  94.  * Parameters:     host_name (host name, www.foo.com)
  95.  *                 filename (filename, /index.html)
  96.  *                 current_status
  97.  *                   0: link should be accepted
  98.  *                   1: link should be refused
  99.  *                  -1: the engine has no opinion (by default, the link will be refused)
  100.  * Should return:  new status
  101.  *                   0: link will be accepted
  102.  *                   1: link will be refused
  103.  *                  -1: we do not have any opinion (by default, current status will be kept)
  104. */
  105. int HTTrackLib_TestLink(char* host_name,char* filename,int current_status);
  106.  
  107.  
  108. /*
  109.  * Name:           HTTrackLib_TestParse
  110.  * Description:    Test if an HTML file has to be parsed (after download)
  111.  * Parameters:     host_name (host name, www.foo.com)
  112.  *                 filename (filename, /index.html)
  113.  *                 buffer_html (address of the HTML buffer)
  114.  *                 buffer_html_size (size of this buffer in bytes)
  115.  * Should return:  response
  116.  *                   0: do not parse this file
  117.  *                   1: parse this file (default behaviour)
  118. */
  119. int HTTrackLib_TestParse(char* host_name,char* filename,char* buffer_html,int buffer_html_size);
  120.  
  121.  
  122. #ifdef _cplusplus
  123. }
  124. #endif
  125.